import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store/'
import { VueAxios } from '@/utils/request' // axios 不建议引入到 Vue 原型链上

import moment from 'moment'
// import 'ant-design-vue/node_modules/moment/locale/zh-cn';
// moment.locale('zh-cn');

import './core/use'
import bootstrap from './core/bootstrap'
import '@/permission' // permission control
import '@/utils/filter' // global filter

Vue.config.productionTip = false;

Vue.filter('timeFormat', function (value) {
  if(!value) return '-';
  return moment(value*1000).format('YYYY-MM-DD HH:mm:ss');
});

Vue.filter('price', function (value) {
  return (value/100).toFixed(2);
});

Vue.use(VueAxios, router)

new Vue({
  router,
  store,
  created () {
    bootstrap()
  },
  render: h => h(App)
}).$mount('#app')
